﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Master.Master" Inherits="System.Web.Mvc.ViewPage<CourseManager.Domain.Entities.Course>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Add Course
</asp:Content>

<asp:Content ID="Content4" runat="server" contentplaceholderid="TabsPlaceHolder">
    <h3>Agregar Curso</h3>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm("AddCourse", "Course", FormMethod.Post))
       { %>
    <div style=" background-color:#FFFFFF;">
          <table style="width: 70%">
            <tr>
                <td><strong>Name:</strong></td>
                <td><input type="text" id="Name" name="Name" style=" width:284px;" />   <strong><%: Html.ValidationMessage("Name", "Campo Requerido")%></strong></td>
            </tr>
            <tr>
                <td><strong>Duration:</strong></td>
                <td><input type="text" id="Duration" name="Duration" style=" width:284px;"/>   <strong><%: Html.ValidationMessage("Duration", "Campo Requerido")%></strong></td>
            </tr>
            <tr>
                <td><strong>Start Date:</strong></td>
                <td><input type="text" id="StartDate" name="StartDate"style=" width:284px;" />   <strong><%: Html.ValidationMessage("StartDate", "Campo Requerido")%></strong></td>
            </tr>
             <tr>
                <td><strong>End Date:</strong></td>
                <td><input type="text" id="EndDate" name="EndDate" style=" width:284px;" />   <strong><%: Html.ValidationMessage("EndDate", "Campo Requerido")%></strong></td>
            </tr>
            <tr>
                <td><strong>Instructor:</strong></td>
                <td><%:Html.DropDownList("Instructor", (IEnumerable<SelectListItem>)ViewData["InstructorList"], new { @Id = "DDLInstructor" })%></td>
            </tr>
            <tr>
                <td><strong>Description:</strong></td>
                <td><textarea  id="Description" name="Description" style=" height:100px; width: 284px;"></textarea>   <strong><%: Html.ValidationMessage("Description", "Campo Requerido")%></strong></td>
            </tr>
        </table>
    </div>
    <br />
    <div class="ContentFormat">
        <input type="submit" value="Agregar Curso" />
         
           <a href="#" id="BtnBack">Back</a>
    
    </div>
    <%} %>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.ui.core.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.ui.datepicker.js" type="text/javascript"></script>
    <link href="../../Content/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/jquery.ui.datepicker.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/Index.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#StartDate").datepicker({
                showOn: 'button',
                dateFormat:'dd-mm-yy',
                buttonImage: "../../Content/Images/calendar.gif",
                buttonImageOnly: true,
                changeMonth: true,
                changeYear: true
            });

            $("#EndDate").datepicker({
                showOn: 'button',
                dateFormat: 'dd-mm-yy',
                buttonImage: "../../Content/Images/calendar.gif",
                buttonImageOnly: true,
                changeMonth: true,
                changeYear: true
            });
        });

          if ($('#StartDate').val() == "") {
            $('#StartDate').datepicker("setDate", new Date());
        }

         if ($('#EndDate').val() == "") {
             $('#EndDate').datepicker("setDate", new Date());
         }
        
    </script>

</asp:Content>

<asp:Content ID="Content5" runat="server" contentplaceholderid="UserFullName">
</asp:Content>












